# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Contributor: Chrys <mail@chrys.de>

pkgname=ocrdesktop
pkgver=4.0
pkgrel=1
pkgdesc="OCR the current window or desktop and make it browsable for the user"
arch=('any')
url="https://github.com/chrys87/ocrdesktop"
license=('GPL3')
depends=('libwnck3' 'python-atspi' 'python-pillow' 'python-pytesseract')
optdepends=('python-webcolors: For color analyzing support'
            'python-scipy: For color analyzing support'
            'python-pdf2image: for PDF support')
install='ocrdesktop.install'
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/chrys87/ocrdesktop/archive/refs/tags/$pkgver.tar.gz")
sha512sums=('ba3ce5af01836a95a324c9985067f2cbf0d0ae505643ea29dd309e014e5cf98943c6fce14291dd2692c4cea53c04ab1785c123fb7220535e4c05795a407757b2')
b2sums=('e3955dde20fa0b830b208ad6796a3b62f6e3e1c7e3c690a082d4bcc446a7a5f310f01e74e5904e0d81cc68e452036f488dc8b82b79381a089f7e4c5e2ebbd142')

package() {
	cd ${pkgname}-${pkgver}
	install -vDm755 ocrdesktop "$pkgdir/usr/bin/ocrdesktop"
	install -vDm644 ocrdesktop.1.gz "${pkgdir}/usr/share/man/man1/ocrdesktop.1.gz"
}
